<body class="hold-transition skin-green sidebar-mini fixed" id="tabs">
<div class="wrapper">

    <header id="header" class="main-header">
        <!-- Logo -->
        <a href="/adm/home/index" class="logo">
            <!-- 迷你模式下Logo的大小为50X50 -->
            <span class="logo-mini">后台管理系统</span>
            <!-- 普通模式下Logo -->
            <span class="logo-lg">后台管理系统</span>
        </a>
        <!-- 顶部通栏样式 -->
        <nav class="navbar navbar-static-top">
            <!-- 边栏切换按钮-->
            <a href="javascript:;" class="sidebar-toggle" data-toggle="offcanvas" role="button">
                <span class="sr-only">后台管理系统</span>
            </a>

            <div id="nav" class="pull-left">
                <!--如果不想在顶部显示角标,则给ul加上disable-top-badge类即可-->
                <ul class="nav nav-tabs nav-addtabs disable-top-badge" role="tablist">
                </ul>
            </div>

            <div class="navbar-custom-menu">
                <ul class="nav navbar-nav">
                    <li class="hidden-xs">
                        <a href="javascript:;" data-toggle="fullscreen"><i class="fa fa-arrows-alt"></i></a>
                    </li>

                    <!-- 账号信息下拉框 -->
                    <li class="dropdown user user-menu">
                        <a href="javascript:;" class="dropdown-toggle" data-toggle="dropdown">
                            <img src="/static/adm/assets/img/avatar.png" class="user-image" alt="Admin">
                            <span class="hidden-xs"><?=$admin['username']?></span>
                        </a>
                        <ul class="dropdown-menu">
                            <!-- User image -->
                            <li class="user-header">
                                <img src="/static/adm/assets/img/avatar.png" class="img-circle" alt="">

                                <p>
                                    <?=$admin['username']?>
                                    <small id="time"></small>
                                </p>
                            </li>

                            <li class="user-footer">
                                <div class="pull-left">
                                    <a href="/adm/home/profile" class="btn btn-primary addtabsit">
                                        <i class="fa fa-user"></i>个人资料
                                    </a>
                                </div>
                                <div class="pull-right">
                                    <a href="/adm/home/logout" class="btn btn-danger">
                                        <i class="fa fa-sign-out"></i>注销
                                    </a>
                                </div>
                            </li>
                        </ul>
                    </li>
                    <!-- 控制栏切换按钮 -->
                    <li>
                        <a href="javascript:;" data-toggle="control-sidebar"><i class="fa fa-gears"></i></a>
                    </li>
                </ul>
            </div>
        </nav>
    </header>
    <aside class="main-sidebar">
        <section class="sidebar">
            <!-- Sidebar user panel -->
            <div class="user-panel hidden-xs">
                <div class="pull-left image">
                    <a href="profile" class="addtabsit"><img src="/static/adm/assets/img/avatar.png"
                                                             class="img-circle" /></a>
                </div>
                <div class="pull-left info">
                    <p>Admin</p>
                    <i class="fa fa-circle text-success"></i> 在线
                </div>
            </div>

            <!--如果想始终显示子菜单,则给ul加上show-submenu类即可-->
            <ul class="sidebar-menu">
                <li class="header">站内导航</li>
                <li class="active">
                    <a href="/adm/home/main" addtabs="1" url="/adm/home/main">
                        <i class="fa fa-dashboard"></i>
                        <span>控制台</span>
                        <!-- <span class="pull-right-container">
                            <small class="label pull-right bg-blue">hot</small>
                        </span> -->
                    </a>
                </li>

                <?php foreach($menus as $v):?>
                <?php if($admin['id'] == 1 || in_array($v['id'],$authIds)):?>
                <li class="treeview">
                    <a href="<?=$v['url']?:'javascript:;'?>" addtabs="<?=$v['id']?>" url="<?=$v['url']?:'javascript:;'?>" py="suoxie<?=$v['id']?>" pinyin="pinyin<?=$v['id']?>">
                        <i class="<?=$v['icon']?>"></i>
                        <span><?=$v['title']?></span>
                        <span class="pull-right-container">
                                <?php if(empty($v['url'])):?>
                            <i class="fa fa-angle-left"></i>
                            <?php endif;?>
                            </span>
                    </a>
                    <ul class="treeview-menu">
                        <?php foreach($v->children as $vv):?>
                        <?php if(($admin['id'] == 1 || in_array($vv['id'],$authIds)) && $v['url'] == '' ):?>
                        <li class="">
                            <a href="<?=$vv['url']?>" addtabs="<?=$vv['id']?>" url="<?=$vv['url']?>" py="suoxie<?=$vv['id']?>" pinyin="pinyin<?=$vv['id']?>">
                                <i class="<?=$vv['icon']?>"></i>
                                <span><?=$vv['title']?></span>
                                <span class="pull-right-container"> </span>
                            </a>
                        </li>
                        <?php endif;?>
                        <?php endforeach;?>
                    </ul>
                </li>
                <?php endif;?>
                <?php endforeach;?>

                <!-- <li class="">
                    <a href="/adm/home/profile" addtabs="0" url="/adm/home/profile">
                        <i class="fa fa-user fa-fw"></i>
                        <span>个人资料</span>
                    </a>
                </li> -->


            </ul>
        </section>
    </aside>

    <div class="content-wrapper tab-content tab-addtabs">

    </div>

    <div class="control-sidebar-bg"></div>
    <style>
        .skin-list li {
            float: left;
            width: 33.33333%;
            padding: 5px;
        }

        .skin-list li a {
            display: block;
            box-shadow: 0 0 3px rgba(0, 0, 0, 0.4);
        }
    </style>
    <!-- Control Sidebar -->
    <aside class="control-sidebar control-sidebar-dark">
        <!-- Create the tabs -->
        <ul class="nav nav-tabs nav-justified control-sidebar-tabs">
            <!-- <li class="active"><a href="#control-sidebar-setting-tab" data-toggle="tab" aria-expanded="true"><i class="fa fa-wrench"></i></a></li> -->
            <!-- <li><a href="#control-sidebar-home-tab" data-toggle="tab"><i class="fa fa-home"></i></a></li>
            <li><a href="#control-sidebar-settings-tab" data-toggle="tab"><i class="fa fa-gears"></i></a></li> -->
        </ul>
        <!-- Tab panes -->
        <div class="tab-content">
            <!-- Home tab content -->
            <div class="tab-pane active" id="control-sidebar-setting-tab">
                <h4 class="control-sidebar-heading">布局设定</h4>
                <div class="form-group"><label class="control-sidebar-subheading"><input type="checkbox" data-layout="fixed" class="pull-right"> 固定布局</label>
                    <p>盒子模型和固定布局不能同时启作用</p>
                </div>
                <div class="form-group"><label class="control-sidebar-subheading"><input type="checkbox" data-layout="layout-boxed" class="pull-right"> 盒子布局</label>
                    <p>盒子布局最大宽度将被限定为1250px</p>
                </div>
                <div class="form-group"><label class="control-sidebar-subheading"><input type="checkbox" data-layout="sidebar-collapse" class="pull-right"> 切换菜单栏</label>
                    <p>切换菜单栏的展示或收起</p>
                </div>
                <div class="form-group"><label class="control-sidebar-subheading"><input type="checkbox" data-enable="expandOnHover" class="pull-right"> 菜单栏自动展开</label>
                    <p>鼠标移到菜单栏自动展开</p>
                </div>
                <div class="form-group"><label class="control-sidebar-subheading"><input type="checkbox" data-menu="show-submenu" class="pull-right"> 显示菜单栏子菜单</label>
                    <p>菜单栏子菜单将始终显示</p>
                </div>
                <div class="form-group"><label class="control-sidebar-subheading"><input type="checkbox" data-menu="disable-top-badge" class="pull-right"> 禁用顶部彩色小角标</label>
                    <p>左边菜单栏的彩色小角标不受影响</p>
                </div>
                <div class="form-group"><label class="control-sidebar-subheading"><input type="checkbox" data-controlsidebar="control-sidebar-open" class="pull-right"> 切换右侧操作栏</label>
                    <p>切换右侧操作栏覆盖或独占</p>
                </div>
                <div class="form-group"><label class="control-sidebar-subheading"><input type="checkbox" data-sidebarskin="toggle" class="pull-right"> 切换右侧操作栏背景</label>
                    <p>将右侧操作栏背景亮色或深色切换</p>
                </div>
                <h4 class="control-sidebar-heading">皮肤</h4>
                <ul class="list-unstyled clearfix skin-list">
                    <li><a href="javascript:;" data-skin="skin-blue" style="" class="clearfix full-opacity-hover">
                        <div><span style="display:block; width: 20%; float: left; height: 7px; background: #367fa9;"></span><span class="bg-light-blue" style="display:block; width: 80%; float: left; height: 7px;"></span></div>
                        <div><span style="display:block; width: 20%; float: left; height: 20px; background: #222d32;"></span><span style="display:block; width: 80%; float: left; height: 20px; background: #f4f5f7;"></span></div>
                    </a>
                        <p class="text-center no-margin">Blue</p>
                    </li>
                    <li><a href="javascript:;" data-skin="skin-black" class="clearfix full-opacity-hover">
                        <div style="box-shadow: 0 0 2px rgba(0,0,0,0.1)" class="clearfix"><span style="display:block; width: 20%; float: left; height: 7px; background: #fefefe;"></span><span style="display:block; width: 80%; float: left; height: 7px; background: #fefefe;"></span></div>
                        <div><span style="display:block; width: 20%; float: left; height: 20px; background: #222;"></span><span style="display:block; width: 80%; float: left; height: 20px; background: #f4f5f7;"></span></div>
                    </a>
                        <p class="text-center no-margin">Black</p>
                    </li>
                    <li><a href="javascript:;" data-skin="skin-purple" class="clearfix full-opacity-hover">
                        <div><span style="display:block; width: 20%; float: left; height: 7px;" class="bg-purple-active"></span><span class="bg-purple" style="display:block; width: 80%; float: left; height: 7px;"></span></div>
                        <div><span style="display:block; width: 20%; float: left; height: 20px; background: #222d32;"></span><span style="display:block; width: 80%; float: left; height: 20px; background: #f4f5f7;"></span></div>
                    </a>
                        <p class="text-center no-margin">Purple</p>
                    </li>
                    <li><a href="javascript:;" data-skin="skin-green" class="clearfix full-opacity-hover">
                        <div><span style="display:block; width: 20%; float: left; height: 7px;" class="bg-green-active"></span><span class="bg-green" style="display:block; width: 80%; float: left; height: 7px;"></span></div>
                        <div><span style="display:block; width: 20%; float: left; height: 20px; background: #222d32;"></span><span style="display:block; width: 80%; float: left; height: 20px; background: #f4f5f7;"></span></div>
                    </a>
                        <p class="text-center no-margin">Green</p>
                    </li>
                    <li><a href="javascript:;" data-skin="skin-red" class="clearfix full-opacity-hover">
                        <div><span style="display:block; width: 20%; float: left; height: 7px;" class="bg-red-active"></span><span class="bg-red" style="display:block; width: 80%; float: left; height: 7px;"></span></div>
                        <div><span style="display:block; width: 20%; float: left; height: 20px; background: #222d32;"></span><span style="display:block; width: 80%; float: left; height: 20px; background: #f4f5f7;"></span></div>
                    </a>
                        <p class="text-center no-margin">Red</p>
                    </li>
                    <li><a href="javascript:;" data-skin="skin-yellow" class="clearfix full-opacity-hover">
                        <div><span style="display:block; width: 20%; float: left; height: 7px;" class="bg-yellow-active"></span><span class="bg-yellow" style="display:block; width: 80%; float: left; height: 7px;"></span></div>
                        <div><span style="display:block; width: 20%; float: left; height: 20px; background: #222d32;"></span><span style="display:block; width: 80%; float: left; height: 20px; background: #f4f5f7;"></span></div>
                    </a>
                        <p class="text-center no-margin">Yellow</p>
                    </li>
                    <li><a href="javascript:;" data-skin="skin-blue-light" class="clearfix full-opacity-hover">
                        <div><span style="display:block; width: 20%; float: left; height: 7px; background: #367fa9;"></span><span class="bg-light-blue" style="display:block; width: 80%; float: left; height: 7px;"></span></div>
                        <div><span style="display:block; width: 20%; float: left; height: 20px; background: #f9fafc;"></span><span style="display:block; width: 80%; float: left; height: 20px; background: #f4f5f7;"></span></div>
                    </a>
                        <p class="text-center no-margin" style="font-size: 12px">Blue Light</p>
                    </li>
                    <li><a href="javascript:;" data-skin="skin-black-light" class="clearfix full-opacity-hover">
                        <div style="box-shadow: 0 0 2px rgba(0,0,0,0.1)" class="clearfix"><span style="display:block; width: 20%; float: left; height: 7px; background: #fefefe;"></span><span style="display:block; width: 80%; float: left; height: 7px; background: #fefefe;"></span></div>
                        <div><span style="display:block; width: 20%; float: left; height: 20px; background: #f9fafc;"></span><span style="display:block; width: 80%; float: left; height: 20px; background: #f4f5f7;"></span></div>
                    </a>
                        <p class="text-center no-margin" style="font-size: 12px">Black Light</p>
                    </li>
                    <li><a href="javascript:;" data-skin="skin-purple-light" class="clearfix full-opacity-hover">
                        <div><span style="display:block; width: 20%; float: left; height: 7px;" class="bg-purple-active"></span><span class="bg-purple" style="display:block; width: 80%; float: left; height: 7px;"></span></div>
                        <div><span style="display:block; width: 20%; float: left; height: 20px; background: #f9fafc;"></span><span style="display:block; width: 80%; float: left; height: 20px; background: #f4f5f7;"></span></div>
                    </a>
                        <p class="text-center no-margin" style="font-size: 12px">Purple Light</p>
                    </li>
                    <li><a href="javascript:;" data-skin="skin-green-light" class="clearfix full-opacity-hover">
                        <div><span style="display:block; width: 20%; float: left; height: 7px;" class="bg-green-active"></span><span class="bg-green" style="display:block; width: 80%; float: left; height: 7px;"></span></div>
                        <div><span style="display:block; width: 20%; float: left; height: 20px; background: #f9fafc;"></span><span style="display:block; width: 80%; float: left; height: 20px; background: #f4f5f7;"></span></div>
                    </a>
                        <p class="text-center no-margin" style="font-size: 12px">Green Light</p>
                    </li>
                    <li><a href="javascript:;" data-skin="skin-red-light" class="clearfix full-opacity-hover">
                        <div><span style="display:block; width: 20%; float: left; height: 7px;" class="bg-red-active"></span><span class="bg-red" style="display:block; width: 80%; float: left; height: 7px;"></span></div>
                        <div><span style="display:block; width: 20%; float: left; height: 20px; background: #f9fafc;"></span><span style="display:block; width: 80%; float: left; height: 20px; background: #f4f5f7;"></span></div>
                    </a>
                        <p class="text-center no-margin" style="font-size: 12px">Red Light</p>
                    </li>
                    <li><a href="javascript:;" data-skin="skin-yellow-light" class="clearfix full-opacity-hover">
                        <div><span style="display:block; width: 20%; float: left; height: 7px;" class="bg-yellow-active"></span><span class="bg-yellow" style="display:block; width: 80%; float: left; height: 7px;"></span></div>
                        <div><span style="display:block; width: 20%; float: left; height: 20px; background: #f9fafc;"></span><span style="display:block; width: 80%; float: left; height: 20px; background: #f4f5f7;"></span></div>
                    </a>
                        <p class="text-center no-margin" style="font-size: 12px;">Yellow Light</p>
                    </li>
                </ul>
            </div>
            <div class="tab-pane" id="control-sidebar-home-tab">
                <h3 class="control-sidebar-heading">主页</h3>
                <!-- <ul class="control-sidebar-menu">
                    <li>
                        <a href="javascript:void(0)">
                            <i class="menu-icon fa fa-birthday-cake bg-red"></i>

                            <div class="menu-info">
                                <h4 class="control-sidebar-subheading">Langdon's Birthday</h4>

                                <p>Will be 23 on April 24th</p>
                            </div>
                        </a>
                    </li>
                </ul> -->
                <!-- /.control-sidebar-menu -->

                <!-- <h3 class="control-sidebar-heading">Tasks Progress</h3>
                <ul class="control-sidebar-menu">
                    <li>
                        <a href="javascript:void(0)">
                            <h4 class="control-sidebar-subheading">
                                Custom Template Design
                                <span class="label label-danger pull-right">70%</span>
                            </h4>

                            <div class="progress progress-xxs">
                                <div class="progress-bar progress-bar-danger" style="width: 70%"></div>
                            </div>
                        </a>
                    </li>
                </ul> -->
                <!-- /.control-sidebar-menu -->

            </div>
            <!-- /.tab-pane -->
            <!-- Stats tab content -->
            <div class="tab-pane" id="control-sidebar-stats-tab">Stats Tab Content</div>
            <!-- /.tab-pane -->
            <!-- Settings tab content -->
            <div class="tab-pane" id="control-sidebar-settings-tab">
                <form method="post">
                    <h3 class="control-sidebar-heading">配置</h3>

                    <!-- /.form-group -->

                    <!-- <div class="form-group">
                        <label class="control-sidebar-subheading">
                            Allow mail redirect
                            <input type="checkbox" class="pull-right" checked>
                        </label>

                        <p>
                            Other sets of options are available
                        </p>
                    </div> -->
                    <!-- /.form-group -->

                    <!-- <div class="form-group">
                        <label class="control-sidebar-subheading">
                            Expose author name in posts
                            <input type="checkbox" class="pull-right" checked>
                        </label>

                        <p>
                            Allow the user to show his name in blog posts
                        </p>
                    </div> -->
                    <!-- /.form-group -->

                    <!-- /.form-group -->
                </form>
            </div>
            <!-- /.tab-pane -->
        </div>
    </aside>
    <!-- /.control-sidebar -->
</div>
<!-- ./wrapper -->
<!-- end main content -->
</body>
<script type="text/javascript">
    function time() {
        var vWeek, vWeek_s, vDay;
        vWeek = ["星期天", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"];
        var date = new Date();
        year = date.getFullYear();
        month = date.getMonth() + 1;
        day = date.getDate();
        hours = date.getHours();
        minutes = date.getMinutes();
        seconds = date.getSeconds();
        vWeek_s = date.getDay();
        document.getElementById("time").innerHTML = year + "年" + month + "月" + day + "日" + "\t" + hours + ":" + minutes + ":" + seconds + "\t" + vWeek[vWeek_s];

    };
    setInterval("time()", 1000);
</script>